
def get_selectors(response, s_type, s_str):
    if s_type in ['re', 'xpath', 'css']:
        return getattr(response, s_type)(s_str).getall()
    else:
        return []


def get_selector(response, s_type, s_str):
    if s_type in ['re', 'xpath', 'css']:
        return getattr(response, s_type)(s_str).get()
    else:
        return None
